﻿using System;
using System.Collections.Generic;
using System.Text;
using ZhaoYan;
using UnityEngine;
using Common;

namespace ZhaoYan
{
    class YezhujingAttack : IAttack
    {
        #region IActionBase Members

        public int ID
        {
            get { return 100; }
        }

        public override event Action<IAttack> OnEnd;

        #endregion
    }

    class Yezhujing : IEnemy
    {
        /// <summary>
        /// 资源名称
        /// </summary>
        public string ObjectName
        {
            get
            {
                return "yezhujing";
            }
        }

        /// <summary>
        /// 武器名
        /// </summary>
        public string WeaponName
        {
            get
            {
                return "wuqi";
            }
        }

        public Yezhujing ()
        {
            //_gameObject =  GameObject.Instantiate(Resources.Load ("robot_pre")) as GameObject;
            //_gameObject.name = "Geblin";
        }

        /// <summary>
        /// 单位属性
        /// </summary>
        public UnitActionType UnitType
        {
            get
            {
                return UnitActionType.LandUnit;
            }
        }



        /// <summary>
        /// 警戒距离
        /// </summary>
        public Vector3 AlertDistance
        {
            get
            {
                return new Vector3 (20, 20, 20);
            }
        }

        /// <summary>
        /// 撤退距离
        /// </summary>
        public Vector3 WithdrawDistance
        {
            get
            {
                return new Vector3 (30, 30, 30);
            }
        }

        /// <summary>
        /// 攻击距离
        /// </summary>
        public Vector3 AttackDistance
        {
            get
            {
                return new Vector3 (5, 5, 5);
            }
        }

        /// <summary>
        /// 正常移动速度
        /// </summary>
        Vector3 _speed = new Vector3 (1.2f, 1.2f, 0.3f);
        public Vector3 NormalSpeed
        {
            get
            {
                return _speed;
            }
        }

        /// <summary>
        /// 正常攻击
        /// </summary>
        public IAttack CreateAttack (object root)
        {
            return new YezhujingAttack ();
        }

        #region IEnemy Members

        public int MaxHP
        {
            get { return 100; }
        }

        public int MaxMP
        {
            get { return 0; }
        }

        public int IdleTick
        {
            get
            {
                return 2000;
            }
        }

        #endregion
    }
}
